:root {

}

/* afaik popover needs a positioning context to be able to calculate the transform */
.PopoverContainer {
	pointer-events: none;
	position: absolute;
	z-index: 4;
}

.PopoverBody {
	pointer-events: auto;
	min-width: 1em; /* ewwwwwwww */
	border: 1px solid #ddd;
	box-shadow: 0 1px 7px rgba(0, 0, 0, .18);
	background-color: #fff;
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
  max-width: 500px;
}

.PopoverBody.PopoverBody--tooltip {
	color: white;
	font-weight: bold;
	background-color: rgb(76,71,71);
	border: none;
	pointer-events: none;
}

/* shared arrow styles */
.PopoverBody--withArrow:before,
.PopoverBody--withArrow:after {
	position: absolute;
	content: '';
	display: block;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	pointer-events: none;
}

.PopoverBody .Form-input {
	font-size: 1rem;
}

.PopoverBody .Form-field {
	margin-bottom: 0.75rem;
}

.PopoverHeader {
	display: flex;
	border-bottom: 1px solid var(--border-color);
	min-width: 400px;
}

.PopoverHeader-item {
	flex: 1;
	position: relative;
	top: 1px; /* to overlap bottom border */
	text-align: center;
	padding: 1em;

	text-transform: uppercase;
	font-size: 0.8em;
	font-weight: 700;
	color: color(var(--base-grey) shade(30%));
	border-bottom: 2px solid transparent;
}

.PopoverHeader-item.selected {
	color: currentcolor;
	border-color: currentcolor;
}

.PopoverHeader-item--withArrow {
	margin-right: 8px;
}

.PopoverHeader-item--withArrow:before,
.PopoverHeader-item--withArrow:after {
	position: absolute;
	content: '';
	display: block;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	top: 50%;
	margin-top: -8px;
}

/* create a slightly larger arrow on the right for border purposes */
.PopoverHeader-item--withArrow:before {
	right: -16px;
	border-left-color: #ddd;
}

/* create a smaller inset arrow on the right */
.PopoverHeader-item--withArrow:after {
	right: -15px;
	border-left-color: #fff;
}

/* create a slightly larger arrow on the top for border purposes */
.tether-element-attached-top .PopoverBody--withArrow:before {
	top: -20px;
	border-bottom-color: #ddd;
}
.tether-element-attached-top .PopoverBody--tooltip:before {
	border-bottom: none;
}

/* create a smaller inset arrow on the top */
.tether-element-attached-top .PopoverBody--withArrow:after {
	top: -18px;
	border-bottom-color: #fff;
}
.tether-element-attached-top .PopoverBody--tooltip:after {
	border-bottom-color: rgb(76,71,71);
}

/* create a slightly larger arrow on the bottom for border purposes */
.tether-element-attached-bottom .PopoverBody--withArrow:before {
	bottom: -20px;
	border-top-color: #ddd;
}
.tether-element-attached-bottom .PopoverBody--tooltip:before {
	border-top: none;
}

/* create a smaller inset arrow on the bottom */
.tether-element-attached-bottom .PopoverBody--withArrow:after {
	bottom: -18px;
	border-top-color: #fff;
}
.tether-element-attached-bottom .PopoverBody--tooltip:after {
	border-top-color: rgb(76,71,71);
}

/* if the tether element is attached right, move our arrows right */
.tether-target-attached-right .PopoverBody--withArrow:before,
.tether-target-attached-right .PopoverBody--withArrow:after {
	right: 12px;
}

/* if the tether element is attached center, move our arrows to the center */
.tether-element-attached-center .PopoverBody--withArrow:before,
.tether-element-attached-center .PopoverBody--withArrow:after {
	margin-left: 50%;
	left: -10px;
}

.tether-element-attached-right .PopoverBody--withArrow:before,
.tether-element-attached-right .PopoverBody--withArrow:after {
	right: 12px;
}

.tether-element-attached-left .PopoverBody--withArrow:before,
.tether-element-attached-left .PopoverBody--withArrow:after {
	left: 12px;
}

#popover-event-target {
	position: fixed;
	width: 6px;
	height: 6px;
	pointer-events: none;
}
